package com.guijq.selfcode.spi;

import java.util.ServiceLoader;

/**
 * @author yangjf
 * @version 0.1.0
 * @time 2018/11/28/028
 */
public class ProviderTest {
    public static void main(String[] args) {
        ServiceLoader<ProviderIntf> serviceLoader = ServiceLoader.load(ProviderIntf.class);
        for (ProviderIntf providerIntf : serviceLoader) {
            System.out.println(providerIntf.sayHello());
        }
    }
}
